{include file="header.html"}    
{include file="title.html"}

<style>
    #page-sdemand{}
    #page-sdemand .sdemand-form{padding:10px;background:#fff;margin-bottom:10px;}
    #page-sdemand .sdemand-form li{margin-bottom:10px;}
    #page-sdemand .sdemand-list{padding:10px;background:#fff;margin:10px 0;}
    #page-sdemand .sdemand-list dl{border-bottom: 1px solid #ddd;margin-top:10px;padding:10px 0;width:100%;}
    #page-sdemand .sdemand-list dl dt{font-size: 14px;line-height:22px;}
    #page-sdemand .sdemand-list dl dt span{color:red}
    #page-sdemand .sdemand-list dl dd{font-size: 14px;line-height:22px;}
</style>
<div id="page-sdemand">
    <div class="sdemand-form">
        <form method="get">
            <input type="hidden" name="app" value="sdemand" />
            <ul>
                <li>
                    <input type="text" name="title" value="{$smarty.get.title|escape}" placeholder="{$lang.title}"/>
                </li>
                <li>
                    <select name="type">
                        <option value="">{$lang.select_pls}</option>
                        {html_options options=$type selected=$smarty.get.type}
                    </select>
                </li>
                <li>
                    <input type="submit" class="red_btn" value="{$lang.query}" />
                </li>
            </ul>
        </form>
    </div>
    
    <div class="sdemand-list">
        <a href="{url app=supply_demand&act=add}" class="red_btn">{$lang.pulish_info}</a>
        <!-- {foreach from=$infos item=info} -->
        <a href="{url app=sdemand&act=view&id=$info.id}" target="_blank">
            <dl>
                <dt><span>{if $info.type eq 1}[{$lang.supply}]{else}[{$lang.demand}]{/if}</span>{$info.title|escape|truncate:20}</dt>
                <dd>{$lang.price}:{if $info.price neq 0}{$info.price|price}{elseif $info.price_from neq 0 and $info.price_to neq 0}{$info.price_from|price} - {$info.price_to|price}{else}{$lang.asktoface}{/if}</dd>
                <dd>{$lang.name}:{$info.name}</dd>
                <dd>{$lang.phone}:{$info.phone}</dd>
                <dd>{$lang.region}:{$info.region_name}</dd>
                <dd>{$lang.add_time}:{$info.add_time|date:Y-m-d H:i}</dd>
            </dl>
        </a>
        <!-- {foreachelse} -->
        <div class="null">
            {$lang.no_records}
        </div>
        <!-- {/foreach} -->
    </div>
    {include file=page.bottom.html}
</div>


{include file=footer.html}